/*
 * @Author: ischen
 * @Date: 2024-06-04 13:39:23
 * @LastEditTime: 2024-06-11 10:48:27
 * @FilePath: RS8025.h
 * @Description: RX8025 Driver
 * ischen.x@outlook.com
 * Copyright (c) 2024 by ischen.x@outlook.com, All Rights Reserved. 
 */
#ifndef __RX8025_H__
#define __RX8025_H__

#include <stdint.h>
#include <time.h>

#define RX8025_DEBUG    0

/* RX8025 8位IIC地址 */
#define RX8025_ADDR	    (0x32<<1)

typedef struct rx8025{
	uint8_t Seconds;
	uint8_t Minutes;
	uint8_t Hours;
	uint8_t Weekdays;
	uint8_t Days;
	uint8_t Mounths;
	uint8_t years;
    uint8_t DigitalOffset;
    uint8_t User1;
    uint8_t User2;
    uint8_t User3;
    uint8_t Alarm_D_Minute;
    uint8_t Alarm_D_Hour;
    uint8_t Reserved;
    uint8_t Control1;
    uint8_t Control2;
}rx8025_reg_type;

int rx8025_set_time(struct tm *time_struct);
int rx8025_get_time(struct tm *time_struct);

#if RX8025_DEBUG
int rx8025_get_reg(uint8_t *pdata);
int rx8025_set_reg(uint8_t *pdata);
#endif

#endif /* __RX8025_H__ */
